cmake_minimum_required(VERSION 3.16)

project(5G-Monitor VERSION 1.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

find_package(Qt6 6.8 REQUIRED COMPONENTS Core Quick Qml Multimedia)

qt_standard_project_setup(REQUIRES 6.8)

qt_add_executable(5G-Monitor
    main.cpp
    networkmonitor.h
    networkmonitor.cpp
    basestationmodel.h
    basestationmodel.cpp
    alarmmodel.h
    alarmmodel.cpp
)

qt_add_qml_module(5G-Monitor
    URI MonitorApp
    VERSION 1.0
    QML_FILES
        Main.qml
        components/MetricCard.qml
        components/MapView.qml
        components/AlarmDialog.qml
        components/TrendChart.qml
        components/PieChart.qml
        components/BaseStationMarker.qml
)

target_link_libraries(5G-Monitor PRIVATE
    Qt6::Core
    Qt6::Quick
    Qt6::Qml
    Qt6::Multimedia
)

set_target_properties(5G-Monitor PROPERTIES
    WIN32_EXECUTABLE TRUE
)

install(TARGETS 5G-Monitor
    BUNDLE DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

